#ifndef __TASK_PARSER_included
#define __TASK_PARSER_included

#include <boost/shared_ptr.hpp>
#include <rapidjson/document.h>

#include "TaskSyncFile.h"

class CTaskParser {

public :

	static boost::shared_ptr<CTask> parse(rapidjson::Value& v) {
		
		if(v["name"].IsString()) {
			string name = v["name"].GetString();
			if(name == "sync-file") {
				return boost::shared_ptr<CTask>(new CTaskSyncFile(v, string("test.bin")));
			}
		}
		return boost::shared_ptr<CTask>();
		
	}


};

#endif // __TASK_PARSER_included